#include "search.h"
#include "ui_search.h"
#include <QAbstractItemView>

Search::Search(QWidget *parent) :
    QWidget(parent), ui(new Ui::Search)
{
    ui->setupUi(this);
    ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
    ui->tableView->setSelectionMode(QAbstractItemView::SingleSelection);
    ui->tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
}

Search::~Search()
{
    delete ui;
}

void Search::setTitle(QString title)
{
    ui->searchLabel->setText(title);
}

QTableView * Search::getTableView()
{
    return ui->tableView;
}

QPushButton * Search::getOkButton()
{
    return ui->okButton;
}

QPushButton * Search::getClearButton()
{
    return ui->clearButton;
}

QPushButton * Search::getCancelButton()
{
    return ui->cancelButton;
}
